<?php

/**
 * Description of Content
 *
 * @author Kam
 */
class My_Form_Element_Wyswig extends Zend_Form_Element_Textarea {

    /**
     * Default form view helper to use for rendering
     * @var string
     */
    public $helper = 'formWyswig';
    protected static $controls = array(
        'font-styles' => false,
        'emphasis' => true,
        'lists' => true,
        'html' => false,
        'link' => false,
        'image' => false,
        'color' => false,
    );
    
    public function __construct($spec, $options = null) {
        parent::__construct($spec, $options);
        $this->setAttrib('controls', self::$controls);
    }

    public function setControl($ctrl, $value = true) {
        $ctrls = $this->getAttrib('controls');
        if (is_array($ctrl)) {
            foreach ($ctrl as $c) {
                $ctrls[$c] = $value;
            }
        } else {
            $ctrls[$ctrl] = $value;
        }
        $this->setAttrib('controls', $ctrls);
    }

}
